package cn.com.guage.dtm.huawei;

import java.util.Scanner;

/**
 *  HJ1 字符串最后一个单词的长度
 */
public class HJ1_字符串最后一个单词的长度 {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
           String next =  scanner.nextLine();
           String [] array = next.split(" ");
           System.out.println(array[array.length-1].length());
        }
    }
}
